home *** CD-ROM | disk | FTP | other *** search
- This is a (for lack of a better name) hypertext widget.
-
- This widget combines text and other Tk widgets in the same window.
- It is sort of a cross between a read-only text widget and the pack command.
- Any widget can be attached to the hypertext window by the %%
- BEGIN
- (label (& blt_htext{widget} ".lab") :text "append "
- :relief "sunken"
- :font "*-Courier-Bold-R-Normal-*-120-*")
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} ".lab"))
- %% command.
- For example,
- %% BEGIN
- (message (& blt_htext{widget} ".msg") :relief "sunken"
- :bd 2
- :aspect 10000
- :font "*-Courier-Medium-R-Normal-*-120-*"
- :text "
- (define W w blt_htext{widget})
- (label (& W '.face) :bitmap \"@bitmaps/face\"
- :relief \"sunken\"
- :borderwidth 2)
- ((eval w) 'append (& W '.face) :padx 2 :pady 0.25i)
- ")
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.msg) :fill 'both)
- %% added this %%BEGIN
- (label (& blt_htext{widget} '.face)
- :bitmap (& "@" *stk-library* "/images/face")
- :relief 'sunken
- :borderwidth 2)
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.face)
- :padx 2 :pady '0.25i :fill 'both)
- %%.
- There can be many types of widgets in the same document. For example,
- this is a simple %%BEGIN
- (button (& blt_htext{widget} '.but) :bg "pink" :text " button "
- :command '(format #t "a stupid message\n"))
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.but))
- %%. If you click on the button, it prints a stupid message.
- Any Tk widget can be used, including %% BEGIN
- (checkbutton (& blt_htext{widget} '.ckbut)
- :bg "lightblue"
- :text " check buttons "
- :command '(format #t " check button pressed\n"))
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.ckbut))
- %%, %%BEGIN
- (radiobutton (& blt_htext{widget} '.rdbut)
- :bg "mediumseagreen"
- :text " radio buttons "
- :command '(format #t " radio button pressed\n"))
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.rdbut))
- %%,
- and scales %%BEGIN
- (scale (& blt_htext{widget} '.sc)
- :showvalue #t
- :length 100
- :sliderlength 10
- :orient "horizontal")
- ((eval blt_htext{widget}) 'append (& blt_htext{widget} '.sc))
- %%.
-